<extend name="Public/base"/>
<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu"/>
</block>
<block name="body">
    <div class="main-title">
        <h2>
            二手信息
        </h2>
    </div>
    <div class="cf">
        <div class="fl">
            <a class="btn" href="{:U('add')}">新 增</a>
        </div>
    </div>
    <!-- 数据表格 -->
    <div class="data-table">
        <table class="">
            <thead>
            <tr>
                <th class="">编号</th>
                <th class="">标题</th>
                <th class="">类型</th>
                <th class="">联系人</th>
                <th class="">公司</th>
                <th class="">所在地区</th>
                <th class="">状态</th>
                <th class="">操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo">
                <tr>
                    <td><span>{$vo.id}</span></td>
                    <td><span>{$vo.title}</span></td>
                    <td><span>
                        <eq name="vo.type" value="1">求购<else/>出售</eq>
                    </span></td>
                    <td><span>{$vo.contact}</span></td>
                    <td><span>{$vo.company} </span></td>
                    <td><span>{$vo.address}</span></td>
                    <td><span>
                        <eq name="vo.show" value="1">已发布<else/>未发布</eq>
                    </span></td>
                    <td>
                        <a href="{:U('edit',array('id'=>$vo['id']))}">修改</a>
                        <eq name="vo.show" value="1">
                            <a href="{:U('mark',array('id'=>$vo['id'],'show'=>0))}" class="confirm ajax-get">禁用</a>
                            <else/>
                            <a href="{:U('mark',array('id'=>$vo['id'],'show'=>1))}" class="confirm ajax-get">启用</a>
                        </eq>
                        <a href="{:U('delete',array('id'=>$vo['id']))}" class="confirm ajax-get">删除</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$page}
    </div>
    </div>
</block>